.class Ljavax/microedition/media/SampledAudioPlayer;
.super Ljava/lang/Object;
.source "SampledAudioPlayer.java"

# interfaces
.implements Ljavax/microedition/media/Player;
.implements Ljavax/sound/sampled/LineListener;


# static fields
.field static class$javax$sound$sampled$Clip:Ljava/lang/Class;


# instance fields
.field private audioInputStream:Ljavax/sound/sampled/AudioInputStream;

.field private clip:Ljavax/sound/sampled/Clip;

.field private decodedStream:Ljavax/sound/sampled/AudioInputStream;

.field private strType:Ljava/lang/String;

.field private vListeners:Ljava/util/Vector;


# direct methods
.method constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 43
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    iput-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    .line 46
    iput-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->decodedStream:Ljavax/sound/sampled/AudioInputStream;

    .line 47
    iput-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    .line 48
    iput-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    .line 49
    iput-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->strType:Ljava/lang/String;

    return-void
.end method

.method static class$(Ljava/lang/String;)Ljava/lang/Class;
    .locals 2
    .parameter "x0"

    .prologue
    .line 71
    :try_start_0
    invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
    :try_end_0
    .catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    return-object v1

    :catch_0
    move-exception v0

    .local v0, x1:Ljava/lang/ClassNotFoundException;
    new-instance v1, Ljava/lang/NoClassDefFoundError;

    invoke-direct {v1}, Ljava/lang/NoClassDefFoundError;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/NoClassDefFoundError;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;

    move-result-object v1

    throw v1
.end method


# virtual methods
.method public addPlayerListener(Ljavax/microedition/media/PlayerListener;)V
    .locals 1
    .parameter "playerListener"

    .prologue
    .line 91
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    if-nez v0, :cond_0

    .line 92
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    iput-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    .line 93
    :cond_0
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    invoke-virtual {v0, p1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 94
    return-void
.end method

.method public close()V
    .locals 2

    .prologue
    .line 98
    invoke-static {p0}, Ljavax/microedition/media/Manager;->mediaDone(Ljava/lang/Object;)V

    .line 99
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v1, :cond_0

    .line 101
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v1}, Ljavax/sound/sampled/Clip;->flush()V

    .line 102
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v1}, Ljavax/sound/sampled/Clip;->close()V

    .line 107
    :cond_0
    :try_start_0
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->decodedStream:Ljavax/sound/sampled/AudioInputStream;

    if-eqz v1, :cond_1

    .line 108
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->decodedStream:Ljavax/sound/sampled/AudioInputStream;

    invoke-virtual {v1}, Ljavax/sound/sampled/AudioInputStream;->close()V

    .line 109
    :cond_1
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    if-eqz v1, :cond_2

    .line 110
    iget-object v1, p0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    invoke-virtual {v1}, Ljavax/sound/sampled/AudioInputStream;->close()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 113
    :cond_2
    :goto_0
    return-void

    .line 112
    :catch_0
    move-exception v1

    move-object v0, v1

    .local v0, e:Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method public deallocate()V
    .locals 1

    .prologue
    .line 116
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v0, :cond_0

    .line 117
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0}, Ljavax/sound/sampled/Clip;->flush()V

    .line 118
    :cond_0
    return-void
.end method

.method public getContentType()Ljava/lang/String;
    .locals 1

    .prologue
    .line 121
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->strType:Ljava/lang/String;

    return-object v0
.end method

.method public getControl(Ljava/lang/String;)Ljavax/microedition/media/Control;
    .locals 1
    .parameter "controlType"

    .prologue
    .line 189
    const/4 v0, 0x0

    return-object v0
.end method

.method public getControls()[Ljavax/microedition/media/Control;
    .locals 1

    .prologue
    .line 194
    const/4 v0, 0x0

    return-object v0
.end method

.method public getDuration()J
    .locals 2

    .prologue
    .line 126
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getMediaTime()J
    .locals 2

    .prologue
    .line 130
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v0, :cond_0

    .line 131
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0}, Ljavax/sound/sampled/Clip;->getMicrosecondPosition()J

    move-result-wide v0

    .line 132
    :goto_0
    return-wide v0

    :cond_0
    const-wide/16 v0, 0x0

    goto :goto_0
.end method

.method public getState()I
    .locals 1

    .prologue
    .line 137
    const/4 v0, 0x0

    return v0
.end method

.method public open(Ljava/io/InputStream;Ljava/lang/String;)Z
    .locals 19
    .parameter "stream"
    .parameter "type"

    .prologue
    .line 53
    move-object/from16 v0, p2

    move-object/from16 v1, p0

    iput-object v0, v1, Ljavax/microedition/media/SampledAudioPlayer;->strType:Ljava/lang/String;

    .line 56
    :try_start_0
    new-instance v5, Ljava/io/BufferedInputStream;

    move-object v0, v5

    move-object/from16 v1, p1

    invoke-direct {v0, v1}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V

    invoke-static {v5}, Ljavax/sound/sampled/AudioSystem;->getAudioInputStream(Ljava/io/InputStream;)Ljavax/sound/sampled/AudioInputStream;

    move-result-object v5

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    .line 57
    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    move-object v5, v0

    invoke-virtual {v5}, Ljavax/sound/sampled/AudioInputStream;->getFormat()Ljavax/sound/sampled/AudioFormat;

    move-result-object v14

    .line 58
    .local v14, format:Ljavax/sound/sampled/AudioFormat;
    invoke-virtual {v14}, Ljavax/sound/sampled/AudioFormat;->getEncoding()Ljavax/sound/sampled/AudioFormat$Encoding;

    move-result-object v5

    sget-object v6, Ljavax/sound/sampled/AudioFormat$Encoding;->PCM_SIGNED:Ljavax/sound/sampled/AudioFormat$Encoding;

    if-eq v5, v6, :cond_1

    .line 60
    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    move-object v5, v0

    invoke-virtual {v5}, Ljavax/sound/sampled/AudioInputStream;->getFormat()Ljavax/sound/sampled/AudioFormat;

    move-result-object v12

    .line 61
    .local v12, baseFormat:Ljavax/sound/sampled/AudioFormat;
    new-instance v4, Ljavax/sound/sampled/AudioFormat;

    sget-object v5, Ljavax/sound/sampled/AudioFormat$Encoding;->PCM_SIGNED:Ljavax/sound/sampled/AudioFormat$Encoding;

    invoke-virtual {v12}, Ljavax/sound/sampled/AudioFormat;->getSampleRate()F

    move-result v6

    const/16 v7, 0x10

    invoke-virtual {v12}, Ljavax/sound/sampled/AudioFormat;->getChannels()I

    move-result v8

    invoke-virtual {v12}, Ljavax/sound/sampled/AudioFormat;->getChannels()I

    move-result v9

    mul-int/lit8 v9, v9, 0x2

    invoke-virtual {v12}, Ljavax/sound/sampled/AudioFormat;->getSampleRate()F

    move-result v10

    const/4 v11, 0x0

    invoke-direct/range {v4 .. v11}, Ljavax/sound/sampled/AudioFormat;-><init>(Ljavax/sound/sampled/AudioFormat$Encoding;FIIIFZ)V

    .line 68
    .local v4, decodedFormat:Ljavax/sound/sampled/AudioFormat;
    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    move-object v5, v0

    invoke-static {v4, v5}, Ljavax/sound/sampled/AudioSystem;->getAudioInputStream(Ljavax/sound/sampled/AudioFormat;Ljavax/sound/sampled/AudioInputStream;)Ljavax/sound/sampled/AudioInputStream;

    move-result-object v5

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Ljavax/microedition/media/SampledAudioPlayer;->decodedStream:Ljavax/sound/sampled/AudioInputStream;

    .line 69
    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->decodedStream:Ljavax/sound/sampled/AudioInputStream;

    move-object v5, v0

    invoke-virtual {v5}, Ljavax/sound/sampled/AudioInputStream;->getFrameLength()J

    move-result-wide v5

    long-to-int v15, v5

    .line 70
    .local v15, frameLength:I
    invoke-virtual {v4}, Ljavax/sound/sampled/AudioFormat;->getFrameSize()I

    move-result v16

    .line 71
    .local v16, frameSize:I
    new-instance v17, Ljavax/sound/sampled/DataLine$Info;

    sget-object v5, Ljavax/microedition/media/SampledAudioPlayer;->class$javax$sound$sampled$Clip:Ljava/lang/Class;

    if-nez v5, :cond_0

    const-string v5, "javax.sound.sampled.Clip"

    invoke-static {v5}, Ljavax/microedition/media/SampledAudioPlayer;->class$(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v5

    sput-object v5, Ljavax/microedition/media/SampledAudioPlayer;->class$javax$sound$sampled$Clip:Ljava/lang/Class;

    :goto_0
    mul-int v6, v15, v16

    move-object/from16 v0, v17

    move-object v1, v5

    move-object v2, v4

    move v3, v6

    invoke-direct {v0, v1, v2, v3}, Ljavax/sound/sampled/DataLine$Info;-><init>(Ljava/lang/Class;Ljavax/sound/sampled/AudioFormat;I)V

    .line 73
    .local v17, info:Ljavax/sound/sampled/DataLine$Info;
    invoke-static/range {v17 .. v17}, Ljavax/sound/sampled/AudioSystem;->getLine(Ljavax/sound/sampled/Line$Info;)Ljavax/sound/sampled/Line;

    move-result-object p1

    .end local p1
    check-cast p1, Ljavax/sound/sampled/Clip;

    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    .line 74
    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    move-object v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->decodedStream:Ljavax/sound/sampled/AudioInputStream;

    move-object v6, v0

    invoke-interface {v5, v6}, Ljavax/sound/sampled/Clip;->open(Ljavax/sound/sampled/AudioInputStream;)V

    .line 86
    .end local v12           #baseFormat:Ljavax/sound/sampled/AudioFormat;
    .end local v4           #decodedFormat:Ljavax/sound/sampled/AudioFormat;
    .end local v15           #frameLength:I
    .end local v16           #frameSize:I
    .end local v17           #info:Ljavax/sound/sampled/DataLine$Info;
    :goto_1
    const/4 v5, 0x1

    .end local v14           #format:Ljavax/sound/sampled/AudioFormat;
    :goto_2
    return v5

    .line 71
    .restart local v4       #decodedFormat:Ljavax/sound/sampled/AudioFormat;
    .restart local v12       #baseFormat:Ljavax/sound/sampled/AudioFormat;
    .restart local v14       #format:Ljavax/sound/sampled/AudioFormat;
    .restart local v15       #frameLength:I
    .restart local v16       #frameSize:I
    .restart local p1
    :cond_0
    sget-object v5, Ljavax/microedition/media/SampledAudioPlayer;->class$javax$sound$sampled$Clip:Ljava/lang/Class;

    goto :goto_0

    .line 78
    .end local v4           #decodedFormat:Ljavax/sound/sampled/AudioFormat;
    .end local v12           #baseFormat:Ljavax/sound/sampled/AudioFormat;
    .end local v15           #frameLength:I
    .end local v16           #frameSize:I
    :cond_1
    new-instance v18, Ljavax/sound/sampled/DataLine$Info;

    sget-object v5, Ljavax/microedition/media/SampledAudioPlayer;->class$javax$sound$sampled$Clip:Ljava/lang/Class;

    if-nez v5, :cond_2

    const-string v5, "javax.sound.sampled.Clip"

    invoke-static {v5}, Ljavax/microedition/media/SampledAudioPlayer;->class$(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v5

    sput-object v5, Ljavax/microedition/media/SampledAudioPlayer;->class$javax$sound$sampled$Clip:Ljava/lang/Class;

    :goto_3
    const/4 v6, -0x1

    move-object/from16 v0, v18

    move-object v1, v5

    move-object v2, v14

    move v3, v6

    invoke-direct {v0, v1, v2, v3}, Ljavax/sound/sampled/DataLine$Info;-><init>(Ljava/lang/Class;Ljavax/sound/sampled/AudioFormat;I)V

    .line 79
    .local v18, info2:Ljavax/sound/sampled/DataLine$Info;
    invoke-static/range {v18 .. v18}, Ljavax/sound/sampled/AudioSystem;->getLine(Ljavax/sound/sampled/Line$Info;)Ljavax/sound/sampled/Line;

    move-result-object p1

    .end local p1
    check-cast p1, Ljavax/sound/sampled/Clip;

    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    .line 80
    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    move-object v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Ljavax/microedition/media/SampledAudioPlayer;->audioInputStream:Ljavax/sound/sampled/AudioInputStream;

    move-object v6, v0

    invoke-interface {v5, v6}, Ljavax/sound/sampled/Clip;->open(Ljavax/sound/sampled/AudioInputStream;)V
    :try_end_0
    .catch Ljavax/sound/sampled/UnsupportedAudioFileException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljavax/sound/sampled/LineUnavailableException; {:try_start_0 .. :try_end_0} :catch_2

    goto :goto_1

    .line 83
    .end local v14           #format:Ljavax/sound/sampled/AudioFormat;
    .end local v18           #info2:Ljavax/sound/sampled/DataLine$Info;
    :catch_0
    move-exception v5

    move-object v13, v5

    .local v13, e:Ljavax/sound/sampled/UnsupportedAudioFileException;
    invoke-virtual {v13}, Ljavax/sound/sampled/UnsupportedAudioFileException;->printStackTrace()V

    const/4 v5, 0x0

    goto :goto_2

    .line 78
    .end local v13           #e:Ljavax/sound/sampled/UnsupportedAudioFileException;
    .restart local v14       #format:Ljavax/sound/sampled/AudioFormat;
    .restart local p1
    :cond_2
    :try_start_1
    sget-object v5, Ljavax/microedition/media/SampledAudioPlayer;->class$javax$sound$sampled$Clip:Ljava/lang/Class;
    :try_end_1
    .catch Ljavax/sound/sampled/UnsupportedAudioFileException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljavax/sound/sampled/LineUnavailableException; {:try_start_1 .. :try_end_1} :catch_2

    goto :goto_3

    .line 84
    .end local v14           #format:Ljavax/sound/sampled/AudioFormat;
    .end local p1
    :catch_1
    move-exception v5

    move-object v13, v5

    .local v13, e:Ljava/io/IOException;
    invoke-virtual {v13}, Ljava/io/IOException;->printStackTrace()V

    const/4 v5, 0x0

    goto :goto_2

    .line 85
    .end local v13           #e:Ljava/io/IOException;
    :catch_2
    move-exception v5

    move-object v13, v5

    .local v13, e:Ljavax/sound/sampled/LineUnavailableException;
    invoke-virtual {v13}, Ljavax/sound/sampled/LineUnavailableException;->printStackTrace()V

    const/4 v5, 0x0

    goto :goto_2
.end method

.method public prefetch()V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 142
    return-void
.end method

.method public realize()V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 146
    return-void
.end method

.method public removePlayerListener(Ljavax/microedition/media/PlayerListener;)V
    .locals 3
    .parameter "playerListener"

    .prologue
    .line 150
    iget-object v2, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    if-nez v2, :cond_1

    .line 161
    :cond_0
    :goto_0
    return-void

    .line 152
    :cond_1
    iget-object v2, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    invoke-virtual {v2}, Ljava/util/Vector;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, it:Ljava/util/Iterator;
    :cond_2
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 154
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljavax/microedition/media/PlayerListener;

    .line 155
    .local v1, listener:Ljavax/microedition/media/PlayerListener;
    if-ne v1, p1, :cond_2

    .line 157
    iget-object v2, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    invoke-virtual {v2, v1}, Ljava/util/Vector;->remove(Ljava/lang/Object;)Z

    goto :goto_0
.end method

.method public setLoopCount(I)V
    .locals 1
    .parameter "count"

    .prologue
    .line 164
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v0, :cond_0

    .line 165
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0, p1}, Ljavax/sound/sampled/Clip;->loop(I)V

    .line 166
    :cond_0
    return-void
.end method

.method public setMediaTime(J)J
    .locals 2
    .parameter "now"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 169
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v0, :cond_0

    .line 170
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0, p1, p2}, Ljavax/sound/sampled/Clip;->setMicrosecondPosition(J)V

    .line 171
    :cond_0
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public start()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 175
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v0, :cond_0

    .line 177
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0, p0}, Ljavax/sound/sampled/Clip;->addLineListener(Ljavax/sound/sampled/LineListener;)V

    .line 178
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0}, Ljavax/sound/sampled/Clip;->start()V

    .line 180
    :cond_0
    return-void
.end method

.method public stop()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 183
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    if-eqz v0, :cond_0

    .line 184
    iget-object v0, p0, Ljavax/microedition/media/SampledAudioPlayer;->clip:Ljavax/sound/sampled/Clip;

    invoke-interface {v0}, Ljavax/sound/sampled/Clip;->stop()V

    .line 185
    :cond_0
    return-void
.end method

.method public update(Ljavax/sound/sampled/LineEvent;)V
    .locals 4
    .parameter "event"

    .prologue
    .line 199
    invoke-virtual {p1}, Ljavax/sound/sampled/LineEvent;->getType()Ljavax/sound/sampled/LineEvent$Type;

    move-result-object v2

    sget-object v3, Ljavax/sound/sampled/LineEvent$Type;->STOP:Ljavax/sound/sampled/LineEvent$Type;

    invoke-virtual {v2, v3}, Ljavax/sound/sampled/LineEvent$Type;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 201
    invoke-virtual {p0}, Ljavax/microedition/media/SampledAudioPlayer;->close()V

    .line 202
    iget-object v2, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    if-eqz v2, :cond_0

    .line 204
    iget-object v2, p0, Ljavax/microedition/media/SampledAudioPlayer;->vListeners:Ljava/util/Vector;

    invoke-virtual {v2}, Ljava/util/Vector;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, it:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 206
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljavax/microedition/media/PlayerListener;

    .line 207
    .local v1, listener:Ljavax/microedition/media/PlayerListener;
    const-string v2, "endOfMedia"

    const/4 v3, 0x0

    invoke-interface {v1, p0, v2, v3}, Ljavax/microedition/media/PlayerListener;->playerUpdate(Ljavax/microedition/media/Player;Ljava/lang/String;Ljava/lang/Object;)V

    goto :goto_0

    .line 211
    .end local v0           #it:Ljava/util/Iterator;
    .end local v1           #listener:Ljavax/microedition/media/PlayerListener;
    :cond_0
    return-void
.end method
